﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="ImpressaoGabarito.aspx.cs" Inherits="admin_ImpressaoGabarito" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
        <ProgressTemplate>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <br />
    <div class="titulo">
        <asp:Label ID="lblTitulo" runat="server" Text="Impressão dos gabaritos"></asp:Label>
    </div>
    <br />
    <div class="grid">
        <div class="campos">
            <div class="coluna_titulo">
                <asp:Label ID="Label3" runat="server" Text="Processo:"></asp:Label>
            </div>
            <div class="coluna_texto2">
                <asp:DropDownList ID="cod_processo_pro" AppendDataBoundItems="true" DataSourceID="odsProcesso"
                    DataTextField="des_processo_pro" DataValueField="des_processo_pro" runat="server"
                    EnableViewState="false" Width="200px">
                </asp:DropDownList>
                <asp:ObjectDataSource ID="odsProcesso" TypeName="ProcessoSeletivo.DAO.Processo" SelectMethod="ListarProcessoDescricao"
                    runat="server"></asp:ObjectDataSource>
            </div>
            <div class="coluna_titulo">
                <asp:Label ID="Label4" runat="server" Text="Tipo:"></asp:Label>
            </div>
            <div class="coluna_texto2">
                <asp:DropDownList ID="tip_processo_pro" runat="server" EnableViewState="false" Width="200px">
                    <asp:ListItem Value="-1">Todos</asp:ListItem>
                    <asp:ListItem Value="1">Normal</asp:ListItem>
                    <asp:ListItem Value="2">Agendado</asp:ListItem>
                </asp:DropDownList>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="button">
            <asp:Button ID="btnConsultar" runat="server" Text="Consultar" />
            <asp:Button ID="btnGerarPDF" runat="server" Text="Gerar PDF" OnClick="btnGerarPDF_Click" />
            <asp:Button ID="btnGerarExcel" runat="server" Text="Gerar Excel" OnClick="btnGerarExcel_Click" />
        </div>
        <br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="grvPrincipal" runat="server" AllowPaging="true" AllowSorting="true"
                    PageSize="25" DataKeyNames="cod_candidato_can" DataSourceID="odsPrincipal" EnableViewState="false"
                    Width="960px" OnRowDataBound="grvPrincipal_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="nom_candidato_can" HeaderText="Nome" SortExpression="nom_candidato_can">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="des_email_can" HeaderText="E-mail" SortExpression="des_email_can">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="des_curso_cur" HeaderText="Curso" SortExpression="des_curso_cur">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="flg_isento_ins" HeaderText="Isento" SortExpression="flg_isento_ins">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="des_processo_pro" HeaderText="Processo" SortExpression="des_processo_pro">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="tip_processo_pro" HeaderText="Tipo" SortExpression="tip_processo_pro">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                    </Columns>
                    <EmptyDataTemplate>
                        Nenhum registro foi encontrado!
                    </EmptyDataTemplate>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <asp:ObjectDataSource ID="odsPrincipal" runat="server" TypeName="ProcessoSeletivo.DAO.DadosCandidato"
        SelectMethod="ListarRelatorioDadosCandidatoInscritosPorFiltro">
        <SelectParameters>
            <asp:ControlParameter ControlID="cod_processo_pro" Name="des_processo_pro" Type="String"
                PropertyName="SelectedValue" />
            <asp:ControlParameter ControlID="tip_processo_pro" Name="tip_processo_pro" Type="Int32"
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <rsweb:ReportViewer ID="rpvPrincipal" runat="server" Font-Names="Verdana" Font-Size="8pt"
        Height="1px" Visible="False" Width="1px">
        <LocalReport ReportPath="admin\relatorios\Gabarito.rdlc">
        </LocalReport>
    </rsweb:ReportViewer>
</asp:Content>
